package cc.rico.algorithm;

import org.apache.commons.lang3.ArrayUtils;

/**
 * @Author: Dell
 * @Date: 2018/12/5
 * @Description:
 */
public class PrintUtil {

    public static void printArray(int[] items) {
        if(ArrayUtils.isEmpty(items)) {
            System.out.println("items is empty ...");
            return;
        }

        String spilt = "";
        StringBuffer buff = new StringBuffer();
        for(int i=0; i<items.length; i++) {
            buff.append(spilt).append(items[i]);
            spilt = ",";
        }

        System.out.println(buff.toString());
    }
}
